package com.shiro.conifg.shiro;


import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


/**
 * 防止spring boot 自作多情注入自己的 shiro filters
 * @author lenovo
 */
@Configuration
public class ShiroFilterRegisterConfig {

    @Bean
    public FilterRegistrationBean shiroLoginFilteRegistration(AjaxPermissionsAuthorizationFilter filter) {
        FilterRegistrationBean registration = new FilterRegistrationBean(filter);
        registration.setEnabled(false);
        return registration;
    }

}